package pe.com.itworth.ttsclient.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	
	public static final String PROPERTIES_PATH = "/com/dlopeztassara/ttspopclient/strings.properties";
	
	public Properties loadProperties() {
		InputStream in = this.getClass().getResourceAsStream(PROPERTIES_PATH);
		Properties properties = new Properties();
		try {
			properties.load(in);
			in.close();
			return properties;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}
	
//	private void saveProperties(Map<String, String> maps) {
//	Properties properties = new Properties();
//	try {
//		FileOutputStream out = new FileOutputStream("com/dlopeztassara/ttspopclient/strings.properties");
//		properties.putAll(maps);
//		properties.save(out,"");
//		out.close();
//	} catch (IOException e) {
//		e.printStackTrace();
//	}
//}

}
